Introduction: USB-ZRLC-TWEEZERS

About: I am a retired Electronic Systems Engineer now pursuing my hobbies full time. I share what I do especially with the world wide student community.

USB connected TI TMS320F28027 based ZRLC Tweezers with

Most Digital multi-meters measure Resistance and Capacitance and LC-meters can measure Inductance and Capacitance. Presented here is a ZRLC meter which can measure Resistance, Capacitance, Inductance and Complex Impedance.

The hardware is built around a TMS320F28027 micro-controller an 8-port-analog-switch ADG714 from analog-devices and a Microchip rail-to-rail dual operational-amplifier MCP6022.

The hardware details, .Hex file for the TMS320F28027 micro-controller and the VS2013 .Net 2.0 files for the PC GUI are provided in this Instructable.

The Source-Code ( TI CCS5.5 C-Code and VS2013 VB.Net-Code) is shared at the GitHub repository: https://github.com/ajoyraman/Aj_ZRLC_Tweezers .

A manual Impedance mode permits experiments and teaching of magnitude, phase and complex impedance concepts.

This hardware will form an invaluable tool for electronics students and hobbyists working with SMD components.



It should be possible to build this unit for less than $ 25.0

Step 1: Principle of Operation

This application is based on the principle of measuring the voltage (amplitude and phase) across an unknown Impedance when fed a sin-wave of known frequency and amplitude through a known resistance.

The hardware is built around a TMS320F28027 micro-controller an 8-port-analogue-switch ADG714 from analogue devices and a Microchip rail-to-rail dual operational-amplifier MCP6022.

A High-Frequency PWM waveform is generated in the micro-controller and modulated by a 64-Bit sin-wave sequence. This when filtered and buffered forms a sin-wave source ( select able 300Hz, 3kHz, 30kHz). The sin-wave source is connected to one of 4-resistors (100, 1k, 10k, 100k) using the analogue-switch. The selected resistor being connected to the unknown Impedance whose second terminal is connected to ground.

Once a frequency and resistance have been set the sin-wave is generated on command and 128 10-Bit samples of Vout (signal-source) and Vin (Voltage at unknown Impedance) are A/D converted and stored in internal memory.

This data is transferred to a PC through an USB port using an USB-to-TTL converter, which also powers the hardware.

Suitable digital-signal-processing on the PC using the VS2103 GUI software displays the real and imaginary part of the unknown Impedance. This is interpreted as Resistance, Capacitance, Inductance or Complex Impedance.

Step 2: Hardware, PCB, BOM and Cost

Hardware & PCB

The Schematic and PCB have been designed using Eagle 7.1 and the design files including the CAM files are available as ZRLC_Main_Eagle_7.1.rar.

The 1:1 printable pdf files for the Bottom and Top-Mirrored are attached for those who wish to make the PCB using the toner-transfer method.

The BOM parts and values are available as .csv files.

This hardware when built is interfaced to the PC USB port using a USB-TTL converter which supplies the +5V power and the Rx-Tx as 3.3V compatible signals. Currently the hardware has been tested using a converter based on the FTDI FT232RL and should work with the CP2102 USB to TTL USB UART serial port converter module.

The major component cost is contributed to by the Integrated Circuits and USB-TTL converter:

TMS320F28027DAT, 32 bit C28x Microcontroller 60 MHz 64 kB Flash, 12 kB RAM, I2C SPI 38-Pin TSSOP
RS Stock No. 798-4475 Mfr Part No. TMS320F28027DAT 524.61 Rs/ $ 9.0

MCP6022-I/P, Dual Operational Amplifier 10 MHz CMOS, R-R, 3 V, 5 V, 8-Pin PDIP RS Stock No. 403-064 Mfr Part No. MCP6022-I/P 108.65 Rs/ $ 2.0

ADG714BRUZ, Analogue SPST Switch Octal SPST, 3 V, 5 V, 24-Pin, TSSOP, 8 RS Stock No. 538-8333 Mfr Part No. ADG714BRUZ 351.64 Rs/ $ 6.0

CP2102 USB to TTL USB UART serial port converter module ebay 235.00 Rs/ $ 4.0

Total= 9 + 2 + 6 + 4 = $ 21.0

It should be possible to build this unit for less than $ 25.0

Step 3: Probes, Box and Test Modes

The probes are detachable and have been fashioned from stainless-steel forceps of the type used for physics experiments. They are cut to size bent, insulated and a transparent plastic sleeve slipped over them.

The unit is boxed in a small plastic container.

As the probe tips are detachable there are two test methods:

1. Tweezers mode

2. Stand alone using miniature clips with wires plugging into the output pins.

For testing a set of components were rigged up on a bread-board and Inductors wound on small cores

Step 4: Software

Embedded processor software:

Programming the TMS320F28027 is extremely easy as it can be carried out using a Freeware version of C2Prog from Coadskin.com. This permits programming through the serial port already configured for use by the hardware.

Using the Aj_ZRLC.Hex file provided, just remove the jumper give a reset and run the programming utility. Connect back the jumper and give a reset for the embedded program to work. Done !

GUI software VS2013 configured for .Net 2:

Just extract the files from Aj_ZRLC_Release.rar to a folder on the PC and execute the Aj_ZRLC.exe file.

By configuring the file for .Net 2 it is compatible with WinXP and Win7.

For Developers:

The Source-Code ( TI CCS5.5 C-Code and VS2013 VB.Net-Code) is shared at the GitHub repository:

https://github.com/ajoyraman/Aj_ZRLC_Tweezers .

Simple one character ASCII commands are used to communicate with the hardware, this Interface Control Document summarizes the commands and responses on the serial link:

COMMANDS and RESPONSES (Interface Control Document)

T for Test

15-Oct-14 09:37:42.552 [TX] - T

15-Oct-14 09:37:42.565 [RX] - Aj_ZRLC Ready

G for set switch 100 Ohms

15-Oct-14 09:38:09.929 [TX] - G

15-Oct-14 09:38:09.943 [RX] - R100

H for set switch 1k Ohms

15-Oct-14 09:38:14.501 [TX] - H

15-Oct-14 09:38:14.514 [RX] - R1K

J for set switch 10k Ohms

15-Oct-14 09:38:18.432 [TX] - J

15-Oct-14 09:38:18.449 [RX] - R10K

K for set switch 100k Ohms

15-Oct-14 09:38:20.881 [TX] - K

15-Oct-14 09:38:20.896 [RX] - R100K

L for all switches off

15-Oct-14 09:38:27.183 [TX] - L

15-Oct-14 09:38:27.200 [RX] - ROFF

A for acquire at 30 kHz

15-Oct-14 09:38:36.855 [TX] - A

15-Oct-14 09:38:36.896 [RX] - DoneA

B for acquire at 3 kHz

15-Oct-14 09:38:45.856 [TX] - B

15-Oct-14 09:38:45.935 [RX] - DoneB

C for acquire at 300 Hz

15-Oct-14 09:38:53.360 [TX] - C

15-Oct-14 09:38:53.695 [RX] - DoneC

Small c for compensate oscillator

15-Oct-14 09:39:28.820 [TX] - c

15-Oct-14 09:39:28.832 [RX] - %

Gives the temperature in decimal mode

15-Oct-14 09:39:28.820 [TX] - 099

15-Oct-14 09:39:28.832 [RX] - 037

O for Output (read acquired data)

15-Oct-14 09:40:29.300 [TX] - O

15-Oct-14 09:40:29.314 [RX] -

Response seen in Hex

128 values for each channel Vout and Vin

10 bit data msb first alternately Vout and Vin

15-Oct-14 09:40:29.300 [TX] - 4F

15-Oct-14 09:40:29.314 [RX] - 05 B4 08 A2 05 B4 08 58 05 1F 08 02 04 F8

08 0A 04 A1 07 D5 04 57 07 AE 04 0A 07 6C 03 DE 07 4F 03 9B 07 4F 03 87

07 12 03 98 06 EF 03 29 06 E9 03 68 06 69 03 72 06 7A 03 72 06 56 03 A0

06 4A 03 7C 05 EF 03 DB 06 05 04 1E 05 FA 04 5C 05 E6 04 AA 05 E3 04 ED

05 E3 05 65 05 CB 05 DC 05 DD 06 46 05 F0 06 7A 05 FC 07 25 05 DB 07 25

06 1B 07 9C 06 35 08 1F 06 5A 08 7B 06 6B 09 04 06 9E 09 6E 06 BF 09 EC

06 FB 0A 64 06 FB 0A 84 07 34 0B 00 07 2A 0B 42 07 7A 0B 9E 07 A5 0B BA

07 E6 0B BA 08 06 0B E4 08 34 0C 0F 08 62 0C 1D 08 88 0C 53 08 D9 0B EC

08 AC 0C 0A 08 FC 0B DC 08 FC 0B AC 09 0F 0B 84 09 2B 0B 14 09 4E 0A EC

09 35 0A 94 09 62 0A 94 09 62 0A 5F 09 8B 09 BC 09 4E 09 5D 09 50 08 F1

09 47 08 9A 09 43 07 E4 09 00 07 80 09 00 07 0F 08 F2 06 A6 08 D4 06 4C

08 B9 05 9C 08 9C 05 5C 08 44 05 5C 08 31 04 FC 08 02 04 AA 07 DD 04 46

07 9A 03 FE 07 6E 03 D3 07 46 03 AE 07 20 03 9F 07 20 03 49 07 0C 03 59

06 A8 03 51 06 9E 03 79 06 72 03 8B 06 65 03 8B 06 4B 03 90 06 12 03 CF

06 0A 04 07 05 F8 04 74 06 12 04 8A 05 CD 04 FA 05 E4 05 48 05 E4 05 B4

05 D3 06 2F 05 DF 06 90 05 F3 07 10 05 EF 07 8A 06 12 07 8A 06 2C 08 1C

06 5B 08 60 06 50 08 E7 06 8A 09 62 06 B8 09 C9 06 DD 0A 35 07 14 0A 77

07 14 0A E6 07 2F 0B 45 07 6D 0B 86 07 A7 0B 7F 07 DC 0B E7 07 D4 0B E7

08 32 0C 08 08 5F 0C 36 08 9F 0B FA 08 90 0C 1F 08 DB 0C 08 08 F4 0C 0F

09 33 0B 9C 09 33 0B 8E 09 11 0B 45 09 4A 0A F6 09 52 0A A6 09 5B 0A 2D

09 6D 0A 2D 09 52 09 D8 09 5E 09 74 09 5B 09 16 09 57 08 4C 09 04 08 0F

09 13 07 9D 08 FF 07 18 08 FF 06 93 08 CC 06 4A 08 A4

Step 5: Experimentation and Teaching

IMPEDANCE MODE

The impedance mode permits manual selection the test frequency and test resistance and can be used to explain the concepts of phase magnitude, their variation with frequency and changes in complex impedance.

The raw data provided and waveform display give additional information which is useful for this purpose.

For example 1:

A pure inductance is measured as 78 uH with a series resistance of 0.91 Ohms

When a 10 Ohm resistor is added in series it indicates 75 uH with 10.99 Ohms

Or example 2:

A 10 nF capacitor is measured under different conditions

At 3 kHz with a test resistance of 1.2 k Ohms the gain is 0.951 and the phase is -12.52 deg

and at 30 kHz with the same test resistance the gain is 0.376 and phase -68.69 deg.

Step 6: Results, Measuring Range and Accuracy

Sample Results:

These screen shots indicate the results of sample tests on components:

1. Opening screen showing connection to com port

2. R 10K

3. L 80 uH

4. C 10 nF

5. L with Series R 100uH 11 Ohm

Accuracy:

Keeping the magnitude of Vout/Vin within the range 0.2 to 0.8 the accuracy is within 5%

Accuracy is degraded outside these limits.

Measurement Ranges

The corresponding theoretical measurement ranges with Test Resistance & Test Frequency are:

Resistance:

100 Ohms with 3 kHz ------- 25 Ohms to 400 Ohms

1200 Ohms with 300 Hz ------ 300 Ohms to 4.8 k Ohms

15 k Ohms with 300 Hz ------- 3.75 k Ohms to 60 k Ohms

180 k Ohms with 300 Hz ------- 45 k Ohms to 720 k Ohms

Capacitance:

100 Ohms with 300 Hz -------- 25.9 uF to 3.98 uF

100 Ohms with 3 kHz -------- 2.59 uF to 0.398 uF

1200 Ohms with 3 kHz -------- 0.21 uF to 33.16 nF

15 k Ohms with 3 kHz -------- 17.3 nF to 2.65 nF

180 k Ohms with 3 kHz -------- 1.44 nF to 221 pF

180 k Ohms with 30 kHz -------- 133 pF to 20.4 pF

Inductance:

100 Ohms with 30 kHz -------- 122 uH to 1.97 mH

1200 Ohms with 30 kHz -------- 1.47 mH to 24 mH

15 k Ohms with 30 kHz -------- 18 mH to 294 mH

180 k Ohms with 30 kHz -------- 221 mH to 3.51 H

Step 7: Precautions and Disclaimer

Precautions:

The impedance under test is fed signals through an analog-switch which is a sensitive device. Therefore capacitors under test must be fully discharged and no testing of components should be carried out on circuits which are powered.


Warning & Disclaimer:

All content provided here is for informational purposes only. The author makes no representations as to the accuracy or completeness of any information. The author will not be liable for any errors or omissions in this information. The author will not be liable for any losses, injuries, or damages from the display or use of this information including software.